﻿/* mvcForum
 * Copyright (C) 2010-2011 Steen F. Tøttrup
 * http://mvcforum.org/
 */

using System;
using System.ComponentModel.DataAnnotations;

namespace mvcForum.Core {

	/// <summary>
	/// This class represent the relationship between a group and a member/user.
	/// </summary>
	public class GroupMember {
		public GroupMember() { }
		public GroupMember(Group group, ForumUser user) {
			this.Group = group;
			this.ForumUser = user;
		}

		#region Properties
		public Int32 Id { get; set; }
		/// <summary>
		/// The group.
		/// </summary>
		[Required]
		public Int32 GroupId { get; set; }
		public virtual Group Group { get; set; }
		/// <summary>
		/// The user.
		/// </summary>
		[Required]
		public Int32 ForumUserId { get; set; }
		public virtual ForumUser ForumUser { get; set; }
		#endregion
	}
}